package com.yonyou.ncmm_pac_pda;

import com.yonyou.uap.um.application.ApplicationContext;
import com.yonyou.uap.um.base.*;
import com.yonyou.uap.um.common.*;
import com.yonyou.uap.um.third.*;
import com.yonyou.uap.um.control.*;
import com.yonyou.uap.um.core.*;
import com.yonyou.uap.um.binder.*;
import com.yonyou.uap.um.runtime.*;
import com.yonyou.uap.um.lexer.*;
import com.yonyou.uap.um.widget.*;
import com.yonyou.uap.um.widget.UmpSlidingLayout.SlidingViewType;
import com.yonyou.uap.um.log.ULog;
import java.util.*;
import android.os.*;
import android.view.*;
import android.widget.*;
import android.webkit.*;
import android.content.*;
import android.graphics.*;
import android.widget.ImageView.ScaleType;

public abstract class MMIssueActivity extends UMWindowActivity {

	protected UMWindow MMIssue = null;
protected XVerticalLayout viewPage0 = null;
protected XVerticalLayout panel0 = null;
protected XHorizontalLayout navigatorbar0 = null;
protected UMButton button0 = null;
protected UMLabel label0 = null;
protected UMImageButton imagebutton1 = null;
protected UMButton button1 = null;
protected XHorizontalLayout panel1 = null;
protected UMSearchControl search0 = null;
protected UMButton button100 = null;
protected UMListViewBase listviewdefine0 = null;
protected XHorizontalLayout panel2 = null;
protected UMLabel label22 = null;
protected XRelativeLayout panel13 = null;
protected UMLabel label1 = null;
protected UMLabel listlbl_vbillcode = null;
protected UMImageButton imagebutton0 = null;
protected UMCheckbox checkbox0 = null;
protected UMLabel label7 = null;
protected UMLabel listlbl_metiral = null;
protected XHorizontalLayout toolbar0 = null;
protected UMButton button2 = null;
protected UMButton button3 = null;
protected UMButton button4 = null;
protected UMButton button7 = null;
protected UMButton button6 = null;
protected UMButton button5 = null;

	
	protected final static int ID_MMISSUE = 175940753;
protected final static int ID_VIEWPAGE0 = 613718135;
protected final static int ID_PANEL0 = 1121646841;
protected final static int ID_NAVIGATORBAR0 = 1514085220;
protected final static int ID_BUTTON0 = 1620135410;
protected final static int ID_LABEL0 = 1441765185;
protected final static int ID_IMAGEBUTTON1 = 726975739;
protected final static int ID_BUTTON1 = 777126086;
protected final static int ID_PANEL1 = 291258755;
protected final static int ID_SEARCH0 = 870004124;
protected final static int ID_BUTTON100 = 694556449;
protected final static int ID_LISTVIEWDEFINE0 = 1992342503;
protected final static int ID_PANEL2 = 1460053361;
protected final static int ID_LABEL22 = 1520991001;
protected final static int ID_PANEL13 = 2047401626;
protected final static int ID_LABEL1 = 197834512;
protected final static int ID_LISTLBL_VBILLCODE = 2144173392;
protected final static int ID_IMAGEBUTTON0 = 1663921038;
protected final static int ID_CHECKBOX0 = 1710446040;
protected final static int ID_LABEL7 = 1818972897;
protected final static int ID_LISTLBL_METIRAL = 92118942;
protected final static int ID_TOOLBAR0 = 338423081;
protected final static int ID_BUTTON2 = 2104230222;
protected final static int ID_BUTTON3 = 1613415464;
protected final static int ID_BUTTON4 = 1378671484;
protected final static int ID_BUTTON7 = 1412210579;
protected final static int ID_BUTTON6 = 870988801;
protected final static int ID_BUTTON5 = 1756642986;

	
	
	@Override
	public String getControllerName() {
		return "MMIssueController";
	}
	
	@Override
	public String getContextName() {
		return "";
	}

	@Override
	public String getNameSpace() {
		return "com.yonyou.ncmm_pac_pda";
	}

	protected void onCreate(Bundle savedInstanceState) {
		ULog.logLC("onCreate", this);
		super.onCreate(savedInstanceState);
        onInit(savedInstanceState);
        
	}
	
	@Override
	protected void onStart() {
		ULog.logLC("onStart", this);
		
		super.onStart();
	}

	@Override
	protected void onRestart() {
		ULog.logLC("onRestart", this);
		
		super.onRestart();
	}

	@Override
	protected void onResume() {
		ULog.logLC("onResume", this);
		
		super.onResume();
	}

	@Override
	protected void onPause() {
		ULog.logLC("onPause", this);
		
		super.onPause();
	}

	@Override
	protected void onStop() {
		ULog.logLC("onStop", this);
		
		super.onStop();
	}

	@Override
	protected void onDestroy() {
		ULog.logLC("onDestroy", this);
		
		super.onDestroy();
	}
	
	public  void onInit(Bundle savedInstanceState) {
		ULog.logLC("onInit", this);
		UMActivity context = this;
		registerControl();
		this.getContainer();
		
		/*
		 new Thread() {
			 public void run() {
				 UMPDebugClient.startServer();
			 }
		 }.start();
		*/
		String sys_debug = ApplicationContext.getCurrent(this).getValue("sys_debug");
		if (sys_debug != null && sys_debug.equalsIgnoreCase("true")) {
			UMPDebugClient.waitForDebug();
		}

		IBinderGroup binderGroup = this;
		currentPage = getCurrentWindow(context, binderGroup);
super.setContentView(currentPage);

		
	}
	
	private void registerControl() {
		  idmap.put("MMIssue",ID_MMISSUE);
  idmap.put("viewPage0",ID_VIEWPAGE0);
  idmap.put("panel0",ID_PANEL0);
  idmap.put("navigatorbar0",ID_NAVIGATORBAR0);
  idmap.put("button0",ID_BUTTON0);
  idmap.put("label0",ID_LABEL0);
  idmap.put("imagebutton1",ID_IMAGEBUTTON1);
  idmap.put("button1",ID_BUTTON1);
  idmap.put("panel1",ID_PANEL1);
  idmap.put("search0",ID_SEARCH0);
  idmap.put("button100",ID_BUTTON100);
  idmap.put("listviewdefine0",ID_LISTVIEWDEFINE0);
  idmap.put("panel2",ID_PANEL2);
  idmap.put("label22",ID_LABEL22);
  idmap.put("panel13",ID_PANEL13);
  idmap.put("label1",ID_LABEL1);
  idmap.put("listlbl_vbillcode",ID_LISTLBL_VBILLCODE);
  idmap.put("imagebutton0",ID_IMAGEBUTTON0);
  idmap.put("checkbox0",ID_CHECKBOX0);
  idmap.put("label7",ID_LABEL7);
  idmap.put("listlbl_metiral",ID_LISTLBL_METIRAL);
  idmap.put("toolbar0",ID_TOOLBAR0);
  idmap.put("button2",ID_BUTTON2);
  idmap.put("button3",ID_BUTTON3);
  idmap.put("button4",ID_BUTTON4);
  idmap.put("button7",ID_BUTTON7);
  idmap.put("button6",ID_BUTTON6);
  idmap.put("button5",ID_BUTTON5);

	}
	
	public void onLoad() {
		ULog.logLC("onLoad", this);
		if(currentPage!=null) {
			currentPage.onLoad();
		}
	
		{ //listviewdefine0 - action:listviewdefine0_onload
    UMEventArgs args = new UMEventArgs(MMIssueActivity.this);
    actionListviewdefine0_onload(listviewdefine0,args);

}

	}
	
	public void onDatabinding() {
		ULog.logLC("onDatabinding", this);
		super.onDatabinding();
		
	}
	
	@Override
	public void onReturn(String methodName, Object returnValue) {
		
	}

	@Override
	public void onAfterInit() {
		ULog.logLC("onAfterInit", this);
		
		onLoad();
	}
	
		@Override
	public Map<String,String> getPlugout(String id) {
		XJSON from = this.getUMContext();
		Map<String,String> r = super.getPlugout(id);
		
		return r;	
	}
	
	
	
	public View getNavigatorbar0View(final UMActivity context,IBinderGroup binderGroup) {
navigatorbar0 = (XHorizontalLayout)ThirdControl.createControl(new XHorizontalLayout(context),ID_NAVIGATORBAR0
,"color","#323232"
,"padding-left","8"
,"font-size","17"
,"valign","center"
,"title","生产领料"
,"width","fill"
,"font-family","default"
,"background-image","navbar_login.png"
,"layout-type","vbox"
,"halign","LEFT"
,"padding-right","8"
,"height","40"
);
button0 = (UMButton)ThirdControl.createControl(new UMButton(context),ID_BUTTON0
,"font-pressed-color","#f2adb2"
,"color","#e50011"
,"padding-left","20"
,"font-size","20"
,"valign","center"
,"width","88"
,"font-family","default"
,"background-image","btn_back"
,"layout-type","hbox"
,"halign","left"
,"value","返回"
,"height","44"
,"pressed-image","btn_back_touch"
);
navigatorbar0.addView(button0);
label0 = (UMLabel)ThirdControl.createControl(new UMLabel(context),ID_LABEL0
,"color","#000000"
,"width","0"
,"weight","1"
,"font-size","14"
,"font-family","default"
,"valign","center"
,"layout-type","hbox"
,"halign","center"
,"height","fill"
);
navigatorbar0.addView(label0);
imagebutton1 = (UMImageButton)ThirdControl.createControl(new UMImageButton(context),ID_IMAGEBUTTON1
,"font-pressed-color","#e50011"
,"color","#919191"
,"icon-pressed-image","button_image_touch"
,"onclick","action:imagebutton1_onclick"
,"icon-height","25"
,"font-size","10"
,"valign","center"
,"icon-text-spacing","3"
,"widthwrap","64.0"
,"imagebuttontype","icon"
,"heightwrap","49.0"
,"icon-background-image","icon_search.png"
,"istogglebutton","false"
,"width","wrap"
,"checked","false"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"icon-width","25"
,"value","图标名称"
,"height","wrap"
);
navigatorbar0.addView(imagebutton1);
button1 = (UMButton)ThirdControl.createControl(new UMButton(context),ID_BUTTON1
,"font-pressed-color","#f2adb2"
,"color","#e50011"
,"onclick","action:button1_onclick"
,"width","44.0"
,"font-size","20"
,"font-family","default"
,"valign","center"
,"background-image","icon_menu.png"
,"layout-type","hbox"
,"halign","center"
,"height","44"
);
navigatorbar0.addView(button1);

return navigatorbar0;
}
public View getPanel1View(final UMActivity context,IBinderGroup binderGroup) {
panel1 = (XHorizontalLayout)ThirdControl.createControl(new XHorizontalLayout(context),ID_PANEL1
,"width","fill"
,"valign","center"
,"layout-type","vbox"
,"halign","LEFT"
,"height","44"
);
search0 = (UMSearchControl)ThirdControl.createControl(new UMSearchControl(context),ID_SEARCH0
,"search-del-icon","search_right.png"
,"color","#000000"
,"search-btn-icon","search_left.png"
,"width","0"
,"weight","1"
,"font-size","14"
,"placeholder","请输入关键字"
,"background-image","search_bg"
,"layout-type","hbox"
,"height","44"
,"font","default"
);
panel1.addView(search0);
button100 = (UMButton)ThirdControl.createControl(new UMButton(context),ID_BUTTON100
,"font-pressed-color","#f2adb2"
,"color","#e50011"
,"width","44.0"
,"font-size","17"
,"font-family","default"
,"valign","center"
,"background-image","icon_code.png"
,"layout-type","hbox"
,"halign","center"
,"height","44"
);
panel1.addView(button100);

return panel1;
}
public View getPanel2View(final UMActivity context,IBinderGroup binderGroup) {
panel2 = (XHorizontalLayout)ThirdControl.createControl(new XHorizontalLayout(context),ID_PANEL2
,"heightwrap","29.0"
,"border-bottom-color","#C7C7C7"
,"background","#FFFFFF"
,"border-bottom-width","1"
,"width","fill"
,"valign","center"
,"layout-type","vbox"
,"title","待领材料列表"
,"halign","CENTER"
,"height","wrap"
);
label22 = (UMLabel)ThirdControl.createControl(new UMLabel(context),ID_LABEL22
,"color","#ff0000"
,"font-weight","bold"
,"font-size","20"
,"valign","center"
,"widthwrap","126.0"
,"content","待领材料列表"
,"heightwrap","29.0"
,"width","wrap"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"height","wrap"
);
panel2.addView(label22);

return panel2;
}
public View getPanel13View(final UMActivity context,IBinderGroup binderGroup) {
panel13 = (XRelativeLayout)ThirdControl.createControl(new XRelativeLayout(context),ID_PANEL13
,"border-bottom-color","#ff0000"
,"border-bottom-width","1px"
,"width","fill"
,"valign","CENTER"
,"layout-type","vbox"
,"halign","CENTER"
,"height","67.0"
);
label1 = (UMLabel)ThirdControl.createControl(new UMLabel(context),ID_LABEL1
,"color","#000000"
,"font-size","14"
,"valign","center"
,"widthwrap","49.0"
,"content","单据号:"
,"heightwrap","20.0"
,"top","0.0"
,"left","50.0"
,"width","wrap"
,"font-family","default"
,"layout-type","relative"
,"halign","center"
,"height","wrap"
);
panel13.addView(label1);
listlbl_vbillcode = (UMLabel)ThirdControl.createControl(new UMLabel(context),ID_LISTLBL_VBILLCODE
,"color","#000000"
,"font-size","14"
,"valign","center"
,"widthwrap","38.0"
,"bindfield","vbillcodepickm"
,"heightwrap","20.0"
,"top","20.0"
,"left","120.0"
,"width","wrap"
,"font-family","default"
,"layout-type","relative"
,"halign","center"
,"height","wrap"
);
panel13.addView(listlbl_vbillcode);
imagebutton0 = (UMImageButton)ThirdControl.createControl(new UMImageButton(context),ID_IMAGEBUTTON0
,"font-pressed-color","#e50011"
,"color","#919191"
,"icon-pressed-image","button_image_touch"
,"icon-height","25"
,"font-size","10"
,"valign","center"
,"icon-text-spacing","3"
,"top","10.0"
,"left","330.0"
,"icon-background-image","icon_enter.png"
,"istogglebutton","false"
,"width","40"
,"checked","false"
,"font-family","default"
,"layout-type","relative"
,"halign","center"
,"icon-width","25"
,"height","30"
);
panel13.addView(imagebutton0);
checkbox0 = (UMCheckbox)ThirdControl.createControl(new UMCheckbox(context),ID_CHECKBOX0
,"check-off-image","checkbox_noselect"
,"top","20.0"
,"left","0.0"
,"check-on-image","checkbox_select"
,"width","30"
,"checked","checked"
,"layout-type","relative"
,"height","30"
);
panel13.addView(checkbox0);
label7 = (UMLabel)ThirdControl.createControl(new UMLabel(context),ID_LABEL7
,"color","#000000"
,"font-size","14"
,"valign","center"
,"widthwrap","64.0"
,"content","产品编码:"
,"heightwrap","20.0"
,"top","20.0"
,"left","50.0"
,"width","wrap"
,"font-family","default"
,"layout-type","relative"
,"halign","center"
,"height","wrap"
);
panel13.addView(label7);
listlbl_metiral = (UMLabel)ThirdControl.createControl(new UMLabel(context),ID_LISTLBL_METIRAL
,"color","#000000"
,"font-size","14"
,"valign","center"
,"widthwrap","38.0"
,"bindfield","vinvcode"
,"heightwrap","20.0"
,"top","20.0"
,"left","120.0"
,"width","wrap"
,"font-family","default"
,"layout-type","relative"
,"halign","center"
,"height","wrap"
);
panel13.addView(listlbl_metiral);

return panel13;
}
public View getListviewdefine0View(final UMActivity context,IBinderGroup binderGroup) {
listviewdefine0 = (UMListViewBase)ThirdControl.createControl(new UMListViewBase(context),ID_LISTVIEWDEFINE0
,"layout","vbox"
,"bindfield","listIssuedata"
,"collapsed","true"
,"background","#c0c0c0"
,"width","fill"
,"valign","TOP"
,"layout-type","vbox"
,"halign","center"
,"onload","action:listviewdefine0_onload"
,"height","540"
);
listviewdefine0.addListItemView("getPanel2View");
listviewdefine0.addListItemView("getPanel13View");

return listviewdefine0;
}
public View getToolbar0View(final UMActivity context,IBinderGroup binderGroup) {
toolbar0 = (XHorizontalLayout)ThirdControl.createControl(new XHorizontalLayout(context),ID_TOOLBAR0
,"width","fill"
,"valign","top"
,"background-image","tabbar"
,"layout-type","vbox"
,"halign","CENTER"
,"height","44.0"
);
button2 = (UMButton)ThirdControl.createControl(new UMButton(context),ID_BUTTON2
,"font-pressed-color","#f2adb2"
,"color","#e50011"
,"onclick","action:button2_onclick"
,"font-size","20"
,"valign","center"
,"margin-right","5"
,"margin-left","5"
,"width","44"
,"font-family","default"
,"layout-type","hbox"
,"halign","left"
,"value","本日"
,"height","fill"
);
toolbar0.addView(button2);
button3 = (UMButton)ThirdControl.createControl(new UMButton(context),ID_BUTTON3
,"font-pressed-color","#f2adb2"
,"color","#e50011"
,"onclick","action:button3_onclick"
,"font-size","20"
,"valign","center"
,"margin-right","5"
,"margin-left","5"
,"width","44"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"value","本周"
,"height","fill"
);
toolbar0.addView(button3);
button4 = (UMButton)ThirdControl.createControl(new UMButton(context),ID_BUTTON4
,"font-pressed-color","#f2adb2"
,"color","#e50011"
,"onclick","action:button4_onclick"
,"font-size","20"
,"valign","center"
,"margin-right","5"
,"margin-left","5"
,"width","44"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"value","本月"
,"height","fill"
);
toolbar0.addView(button4);
button7 = (UMButton)ThirdControl.createControl(new UMButton(context),ID_BUTTON7
,"font-pressed-color","#f2adb2"
,"color","#e50011"
,"font-size","20"
,"valign","center"
,"widthwrap","42.0"
,"margin-right","5"
,"margin-left","5"
,"width","wrap"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"value","采集"
,"height","44"
);
toolbar0.addView(button7);
button6 = (UMButton)ThirdControl.createControl(new UMButton(context),ID_BUTTON6
,"font-pressed-color","#f2adb2"
,"color","#e50011"
,"font-size","20"
,"valign","center"
,"widthwrap","42.0"
,"margin-right","5"
,"margin-left","5"
,"width","wrap"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"value","提交"
,"height","44"
);
toolbar0.addView(button6);
button5 = (UMButton)ThirdControl.createControl(new UMButton(context),ID_BUTTON5
,"font-pressed-color","#f2adb2"
,"color","#e50011"
,"onclick","action:button5_onclick"
,"font-size","20"
,"valign","center"
,"widthwrap","84.0"
,"margin-right","5"
,"margin-left","5"
,"width","wrap"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"value","扫描记录"
,"height","fill"
);
toolbar0.addView(button5);

return toolbar0;
}
public View getPanel0View(final UMActivity context,IBinderGroup binderGroup) {
panel0 = (XVerticalLayout)ThirdControl.createControl(new XVerticalLayout(context),ID_PANEL0
,"width","fill"
,"valign","TOP"
,"layout-type","vbox"
,"halign","center"
,"height","fill"
);
View navigatorbar0 = (View) getNavigatorbar0View((UMActivity)context,binderGroup);
panel0.addView(navigatorbar0);
View panel1 = (View) getPanel1View((UMActivity)context,binderGroup);
panel0.addView(panel1);
View listviewdefine0 = (View) getListviewdefine0View((UMActivity)context,binderGroup);
panel0.addView(listviewdefine0);
View toolbar0 = (View) getToolbar0View((UMActivity)context,binderGroup);
panel0.addView(toolbar0);

return panel0;
}
public View getViewPage0View(final UMActivity context,IBinderGroup binderGroup) {
viewPage0 = (XVerticalLayout)ThirdControl.createControl(new XVerticalLayout(context),ID_VIEWPAGE0
,"background","#F5F5F5"
,"width","fill"
,"valign","TOP"
,"layout-type","vbox"
,"halign","center"
,"height","fill"
);
View panel0 = (View) getPanel0View((UMActivity)context,binderGroup);
viewPage0.addView(panel0);

return viewPage0;
}
public UMWindow getCurrentWindow(final UMActivity context,IBinderGroup binderGroup) {
MMIssue = (UMWindow)ThirdControl.createControl(new UMWindow(context),ID_MMISSUE
,"layout","vbox"
,"controller","MMIssueController"
,"namespace","com.yonyou.ncmm_pac_pda"
,"width","fill"
,"valign","TOP"
,"layout-type","linear"
,"halign","center"
,"height","fill"
);
View viewPage0 = (View) getViewPage0View((UMActivity)context,binderGroup);
MMIssue.addView(viewPage0);

return (UMWindow)MMIssue;
}

	
	public void actionButton1_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "button1_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "this.button1_onclick()",UMActivity.getViewId(control),args);
}
public void actionButton2_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "button2_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "this.button2_onclick()",UMActivity.getViewId(control),args);
}
public void actionButton5_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "button5_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "this.button5_onclick()",UMActivity.getViewId(control),args);
}
public void actionButton3_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "button3_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "this.button3_onclick()",UMActivity.getViewId(control),args);
}
public void actionButton4_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "button4_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "this.button4_onclick()",UMActivity.getViewId(control),args);
}
public void actionListviewdefine0_onload(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "listviewdefine0_onload";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "this.loaddata()",UMActivity.getViewId(control),args);
}
public void actionImagebutton1_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "imagebutton1_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "this.imagebutton1_onclick()",UMActivity.getViewId(control),args);
}


}
